FROM anapsix/alpine-java:8_server-jre_unlimited

MAINTAINER yujianjun(xxxx@163.com)

ENV TZ=Asia/Shanghai

RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN mkdir -p /sca-microservice

WORKDIR /sca-microservice

EXPOSE 10001

ADD ./target/sca-microservice.jar ./

ADD ./skywalking/agent/ /agent

#CMD sleep 30;java -Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom -jar sca-microservice.jar
CMD sleep 30;java -Xms128m -Xmx256m -javaagent:/agent/skywalking-agent.jar -Dskywalking.agent.service_name=sca-microservice -Dskywalking.collector.backend_service=skywalkingserver:11800 -Djava.security.egd=file:/dev/./urandom -jar sca-microservice.jar
